﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;

namespace Alfa.Common.ValidationRules {
	public class NotNullValidationRule : ValidationRuleBase {
		public NotNullValidationRule( ) { }

		public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo) {
			if (value == null)
				return this.ParseError(false, Messages.IsRequired);
			else
				return this.ParseError(true, null);
		}
	}
}
